//
//  LZFPublishButton.m
//  LZFBuDieJie
//
//  Created by 梁梓烽 on 16/7/7.
//  Copyright © 2016年 liangzifeng. All rights reserved.
//

#import "LZFPublishButton.h"

@implementation LZFPublishButton

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self=[super initWithFrame:frame]) {
        [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        self.titleLabel.textAlignment=UITextAlignmentCenter;
       
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    //imageView
    self.imageView.xmg_centerX=self.xmg_width*0.5;
    self.imageView.xmg_y=0;
    
    //titleLabel
    [self.titleLabel sizeToFit];
    self.titleLabel.xmg_width=self.xmg_width;
    self.titleLabel.xmg_x=0;
    self.titleLabel.xmg_y=self.xmg_height-self.titleLabel.xmg_height;
    
    
}

@end
